#!/usr/bin/python
import sys
import random

REQ_HANDSHAKE = 100
REQ_DATA = 101
REQ_CONTINUE = 102
REQ_INSERT = 103

REPLY_HANDSHAKE = 200
REPLY_INSERT = 202
REPLY_NOTFOUND = 203

SEND_INSERT = 300
SEND_DATA = 301

JOIN_ANNOUNCE = 401

class Message():
    def __init__ (self, type):
        self.tid = random.getrandbits(64)
        self.htl = 5
        self.depth = 0
        self.type = type

    def inc_depth(self):
        self.depth = self.depth + 1

    def dec_htl(self):
        self.htl = self.htl -1


if __name__ == "__main__":
    m = Message(REQ_HANDSHAKE)
    print m.tid


